package com.dios.mirage.component.fields;

import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.XYEdges;
import net.rim.device.api.ui.component.BitmapField;
import net.rim.device.api.ui.decor.Border;
import net.rim.device.api.ui.decor.BorderFactory;

public class FocusableField extends BitmapField{

	public FocusableField(Bitmap bitmap, long style) {
		super(bitmap, style);
	}

	protected void onFocus(int arg0) {
		super.onFocus(arg0);
		XYEdges edge = new XYEdges(2, 2, 2, 2);
		this.setBorder(BorderFactory.createSimpleBorder(edge,Border.STYLE_SOLID));
	}

	protected void onUnfocus() {
		super.onUnfocus();
		this.setBorder(null);
	}

}
